<?php

namespace app\utils;
use think\facade\Cache;


class DataCache
{

    public static function write($name, $value,$time=5)
    {
        
        Cache::set(md5($name), $value,$time);
        
        return true;
    }

    public static function read($name)
    {
        
        $value = Cache::get(md5($name),false);
        
        return $value;

    }

}